package com._51cto.healthy.schedul;

import com._51cto.healthy.minio.MinIoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class AutoDisposalImage {
    @Autowired
    private MinIoService minIoService;
    // 每周一凌晨 2 点执行
    @Scheduled(cron = "0 0 2 ? * 1")
    public void run() {
        minIoService.disposal();
    }
}
